<template>
  <div>
    <div class="indexUser">
      <div>
        <!-- header  点击 -->
        <headers :userList="userList"></headers>
      </div>
      <div class="bg1 userBox">
        <div class="wrap bgw content">
          <div v-if="type==0">
            <div class="titles">我的问诊</div>
            <div class="box">
              <div class="list">
                <img class="fl" src="@/assets/image/bg1.jpg" alt />
                <div class="fl txt">
                  <p class="one">
                    <span class="c1">王富贵</span>
                    <span>医生</span>
                    <span>乌鲁木齐第一人民医院</span>
                    <span>耳鼻喉科</span>
                  </p>
                  <p class="one">科别： 儿科</p>
                  <p class="one">临床诊断：流行性感冒</p>
                  <p class="c1" @click="type=3">查看详情</p>
                </div>
                <div class="fr">
                  <span @click="type=1">评论</span>
                  <span @click="type=2">复诊</span>
                </div>
              </div>
            </div>
          </div>
          <!-- 评价 -->
          <div v-if="type == 1">
            <div class="titles">问诊评价</div>
            <div class="assess">
              <div class="fl">
                <img src="@/assets/image/bg1.jpg" alt />
                <p>
                  <span class="c1">鲁大师</span>
                  医生
                </p>
                <p>
                  乌鲁木齐第一人民医院
                  <span>耳鼻喉科</span>
                </p>
              </div>
              <div class="fr">
                <textarea placeholder="请留下您宝贵的意见"></textarea>
                <p>评论</p>
              </div>
            </div>
          </div>
          <!-- 复诊 -->
          <div v-if="type == 2">
            <div class="titles">复诊</div>
            <div class="fuzhen">
              <img class="fl" src="@/assets/image/bg1.jpg" alt />
              <div class="fl">
                <p class="one">
                  <span>王老五</span>
                  <span>男</span>
                  <span>30岁</span>
                </p>
                <p class="one">
                  <span>电话：181451212212</span>
                  <span class="c1">历史诊断记录</span>
                  复诊时间
                  <input type="number" />月
                  <input type="number" />日
                  <input type="number" />：
                  <input type="number" />
                </p>
              </div>
              <div class="fr">
                <button>确认并发送复诊时间</button>
              </div>
            </div>
          </div>
          <!-- 问诊 详情 -->
          <div v-if="type == 3" class="wenzhen_details">
            <div class="headerTop">
              <div class="titles">问诊详情</div>
              <div class="list">
                <img class="fl" src="@/assets/image/bg1.jpg" alt />
                <div class="fl txt">
                  <p class="one">
                    <span class="c1">王富贵</span>
                    <span>医生</span>
                    <span>乌鲁木齐第一人民医院</span>
                    <span>耳鼻喉科</span>
                  </p>
                  <p class="one">科别： 儿科</p>
                  <p class="one">临床诊断：流行性感冒</p>
                </div>
                <div class="fr">
                  <span>评论</span>
                  <span>复诊</span>
                </div>
              </div>
              <div class="txt">
                <div class="txts">
                  <p class="ffl">姓名</p>
                  <p class="ffr">张正国</p>
                </div>
                <div class="txts">
                  <p class="ffl">年龄</p>
                  <p class="ffr">28</p>
                </div>
                <div class="txts">
                  <p class="ffl">性别</p>
                  <p class="ffr">男</p>
                </div>
                <div class="txts">
                  <p class="ffl">体重</p>
                  <p class="ffr">118</p>
                </div>
                <div class="txts">
                  <p class="ffl">身高</p>
                  <p class="ffr">188</p>
                </div>
                <div class="txts">
                  <p class="ffl">手机号</p>
                  <p class="ffr">18485454545458</p>
                </div>
                <div class="txts">
                  <p class="ffl">过敏史</p>
                  <p class="ffr">青霉素</p>
                </div>
                <div class="txts">
                  <p class="ffl">遗传史</p>
                  <p class="ffr">无</p>
                </div>
                <div class="txts">
                  <p class="ffl">疾病情况</p>
                  <p class="ffr">头疼恶心，浑身无力</p>
                </div>
                <div class="txts">
                  <p class="ffl">上传检验报告</p>
                  <p class="ffr">无</p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div>
        <publicBottom></publicBottom>
      </div>
    </div>
  </div>
</template>
<script>
import headers from "../header"; // 头部 TOP 和header
import publicBottom from "@/components/public/public_bottom"; //底部
import { usergetinfo } from "@/request/user";

export default {
  components: {
    headers,
    publicBottom
  },
  data() {
    return {
      type: 0,
      userList: [] // 个人信息
    };
  },
  created() {
   let datas = localStorage.getItem("lzyyToken");
    let Athis = this;
    if (datas != null) {
      this.$tokens = datas;
    } else {
      this.$message.error("登录错误，请重新登录");
      setTimeout(function() {
        Athis.$router.replace({ path: "/land" });
      }, 1000);
    }
    this.init();
    // this.state=this.$route.query.state
  },
  methods: {
    init() {
      //   个人信息
      usergetinfo({
        token: this.$tokens
      }).then(res => {
        this.userList = res.data;
      });
    }
  }
};
</script>

<style lang="less" scoped>
.content {
  min-height: 700px;
  border: 1px solid #e6e6e6;
}

.titles {
  height: 69px;
  line-height: 69px;
  text-indent: 36px;
  font-size: 18px;
  font-family: Microsoft YaHei;
  font-weight: 400;
  color: rgba(78, 238, 200, 1);
  border-bottom: 1px solid #e6e6e6;
}
.c1 {
  color: #4eeec8;
}

//  主页
.list {
  overflow: hidden;
  border-bottom: 1px solid #e6e6e6;
  height: 200px;
  padding-left: 36px;
  padding-right: 36px;
  padding-top: 30px;
  font-size: 18px;
  .fr {
    padding-top: 50px;
    span {
      margin-left: 32px;
      display: inline-block;
      width: 100px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      border: 1px solid rgba(78, 238, 200, 1);
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(78, 238, 200, 1);
    }
  }
  img {
    width: 110px;
    height: 110px;
    margin-right: 33px;
  }

  .fl {
    p {
      line-height: 40px;
    }
    .one {
      span {
        margin-right: 30px;
      }
    }
  }
}

//  问诊 评价
.assess {
  padding-top: 60px;
  padding-left: 130px;
  padding-right: 130px;
  overflow: hidden;

  .fl {
    img {
      width: 204px;
      height: 204px;
      margin-bottom: 36px;
      display: block;
    }

    p {
      font-size: 18px;
      font-family: Microsoft YaHei;
      font-weight: 400;
      color: rgba(49, 49, 49, 1);
      line-height: 40px;
      span {
        margin-right: 30px;
      }
    }
    .c1 {
      color: #4eeec8;
    }
  }

  .fr {
    textarea {
      width: 452px;
      height: 336px;
      font-size: 18px;
      padding-top: 20px;
      text-indent: 20px;
    }
    p {
      margin-top: 54px;
      width: 100px;
      height: 40px;
      line-height: 40px;
      text-align: center;
      background: rgba(78, 238, 200, 1);
      border-radius: 8px;
      color: rgba(255, 255, 255, 1);
    }
  }
}

// .复诊
.fuzhen {
  height: 194px;
  border-bottom: 1px solid #e5e5e5;
  padding-left: 73px;
  padding-right: 73px;
  padding-top: 47px;
  img {
    width: 100px;
    height: 100px;
    margin-right: 40px;
  }
  p {
    font-size: 16px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: rgba(51, 51, 51, 1);
    line-height: 40px;
    span {
      margin-right: 35px;
      display: inline-block;
    }
  }

  input {
    width: 30px;
    text-align: center;
    border-bottom: 1px solid#4D4D4D !important;
  }
  .fr {
    padding-top: 28px;
    button {
      width: 224px;
      height: 46px;
      font-size: 18px;
    }
  }
}

//  问诊详情
.wenzhen_details {
  .txt {
    padding-bottom: 40px;
    padding-top: 40px;
  }
  .txts {
    font-size: 22px;
    font-family: Microsoft YaHei;
    font-weight: 400;
    color: rgba(49, 49, 49, 1);
    line-height: 60px;
    padding-left: 88px;
    .ffl {
      width: 140px;
      display: inline-block;
    }
    .ffr {
      display: inline-block;
      color: rgba(168, 168, 168, 1);
    }
  }
}
</style>